<?php
ob_start();
session_start();
include("utils.php");
main_content("mainBuySpace();");
// echo '<pre>';
//  print_r($_REQUEST);
//  echo '</pre>';
function mainBuySpace()
{

if($_SESSION['langId']!="")
	{
		$langId=$_SESSION['langId'];
	}
	else
	{
		$langId="1";
	}


$sql="select s.*,adm.*,addet.adspaceType FROM ".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId ";
/*  Keyword Search  */
if(isset($_POST['key_word_search']))
{
$keyword = $_POST['keyword'];

	if($_POST['keyword']=='' && $_POST['product'] =='all')
	{
	$sql="select s.*,adm.*,addet.adspaceType FROM ".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId";
	
	}

	if($_POST['keyword']=='' && $_POST['product'] !='all')
	{
	$sql="select s.*,adm.*,addet.adspaceType FROM ".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId and addet.adspaceType= '".$_POST['product']."'  ";
	//echo $sql;
	}

	if($_POST['keyword']!='' && $_POST['product'] =='all')
	{
	$sql="select s.*,adm.*,addet.adspaceType FROM ".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId and (s.adSiteUrl like '%$keyword%' OR s.adSiteName like '%$keyword%' OR s.siteDescription like '%$keyword%') ";
	}


	if($_POST['keyword']!='' && $_POST['product'] !='all')
	{
	$sql="select s.*,adm.*,addet.adspaceType FROM ".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId and (s.adSiteUrl like '%$keyword%' OR s.adSiteName like '%$keyword%' OR s.siteDescription like '%$keyword%') and addet.adspaceType= '".$_POST['product']."' ";
	}

}

/*End of Keyword Search*/

// Listing Search

if(isset($_POST['left_bottom_search']))
{
$res_country = mysql_query("select * from country");
$total_country=mysql_num_rows($res_country);

	if($_REQUEST['countryList'][0]!='all' && $_REQUEST['categoryList'][0]=='all')
	{
		$sql="select s.*,adm.*,addet.adspaceType FROM adspaceTopcountries as at,".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId and addet.adspaceId=at.adspaceId and ";

		if(count($_REQUEST['countryList'])>1)
		{
			//echo "<script>alert('hi22');</script>";
			for($i=0;$i<count($_REQUEST['countryList']);$i++)
			{
				$sql_country="select countryName from country where countryId = '".$_REQUEST['countryList'][$i]."'";
				//echo $sql_country;
				$exe_country=mysql_query($sql_country);
				$row_country_name=mysql_fetch_array($exe_country);
				if($i==0)
				{
					$sql.="(";
				}
				if($i<count($_REQUEST['countryList'])-1)
				{
					$sql.="at.adCountryName = '".$row_country_name['countryName']."' OR ";
				}
				if($i==count($_REQUEST['countryList'])-1)
				{
					$sql.="at.adCountryName = '".$row_country_name['countryName']."')";
				}	
			}
		}
		else
		{
			//echo "<script>alert('hi');</script>";
			$sql_country="select countryName from country where countryId = '".$_REQUEST['countryList'][0]."'";
			//echo $sql_country;
			$exe_country=mysql_query($sql_country);
			$row_country_name=mysql_fetch_array($exe_country);

			$sql.="at.adCountryName = '".$row_country_name['countryName']."'";
		}
	}

	if($_POST['countryList'][0]!='all' && $_POST['categoryList'][0]!='all')
	{
		$sql="select s.*,adm.*,addet.adspaceType FROM adspaceTopcountries as at,".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId and addet.adspaceId=at.adspaceId and ";

		######################### country starts #######################

		if(count($_REQUEST['countryList'])>1)
		{
			//echo "<script>alert('hi100');</script>";
			for($i=0;$i<count($_REQUEST['countryList']);$i++)
			{
				$sql_country="select countryName from country where countryId = '".$_REQUEST['countryList'][$i]."'";
				//echo $sql_country;
				$exe_country=mysql_query($sql_country);
				$row_country_name=mysql_fetch_array($exe_country);
				if($i==0)
				{
					$sql.="(";
				}
				if($i<count($_REQUEST['countryList'])-1)
				{
					$sql.="at.adCountryName = '".$row_country_name['countryName']."' OR ";
				}
				if($i==count($_REQUEST['countryList'])-1)
				{
					$sql.="at.adCountryName = '".$row_country_name['countryName']."') AND ";
				}	
			}
		}
		else
		{
			//echo "<script>alert('hi101');</script>";
			$sql_country="select countryName from country where countryId = '".$_REQUEST['countryList'][0]."'";
			//echo $sql_country;
			$exe_country=mysql_query($sql_country);
			$row_country_name=mysql_fetch_array($exe_country);

			$sql.="at.adCountryName = '".$row_country_name['countryName']."' AND ";
		}

		######################### country ends ###########################

		##################### category starts#############
		if(count($_REQUEST['categoryList'])>1)
		{
			//echo "<script>alert('hi102');</script>";
			for($j=0;$j<count($_REQUEST['categoryList']);$j++)
			{
				if($j==0)
				{
					$sql.="(";
				}
				if($j<count($_REQUEST['categoryList'])-1)
				{
					$sql.="s.adcategoryId = '".$_REQUEST['categoryList'][$j]."' OR ";
				}
				if($j==count($_REQUEST['categoryList'])-1)
				{
					$sql.="s.adcategoryId = '".$_REQUEST['categoryList'][$j]."')";
				}	
			}
		}
		else
		{
			//echo "<script>alert('hi103');</script>";

			$sql.="s.adcategoryId = '".$_REQUEST['categoryList'][0]."'";
		}
		#################### category ends ###############
	}

	if($_POST['countryList'][0]=='all' && $_POST['categoryList'][0]=='all')
	{
		//echo "<script>alert('hi52');</script>";

		$sql="select s.*,adm.*,addet.adspaceType FROM adspaceTopcountries as at,".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId and addet.adspaceId=at.adspaceId ";
	}

	if($_REQUEST['countryList'][0]=='all' && $_REQUEST['categoryList'][0]!='all')
	{
		$sql="select s.*,adm.*,addet.adspaceType FROM adspaceTopcountries as at,".SITEMASTER." as s,".ADSPSCEMASTER." as adm,".ADSPACEDETAILS." as addet where s.langId='".$langId."' and s.adsiteId=adm.adsiteId and addet.adspaceId=adm.adspaceId and addet.adspaceId=at.adspaceId and ";

		#####################starts#############
		if(count($_REQUEST['categoryList'])>1)
		{
			//echo "<script>alert('hi32');</script>";
			for($i=0;$i<count($_REQUEST['categoryList']);$i++)
			{
				if($i==0)
				{
					$sql.="(";
				}
				if($i<count($_REQUEST['categoryList'])-1)
				{
					$sql.="s.adcategoryId = '".$_REQUEST['categoryList'][$i]."' OR ";
				}
				if($i==count($_REQUEST['categoryList'])-1)
				{
					$sql.="s.adcategoryId = '".$_REQUEST['categoryList'][$i]."')";
				}	
			}
		}
		else
		{
			//echo "<script>alert('hi42');</script>";

			$sql.="s.adcategoryId = '".$_REQUEST['categoryList'][0]."'";
		}
		#################### ends ###############

		
	}
}

// end of listing search

//echo $sql;
$query=mysql_query($sql);


?>


<script>
function addtoFav()
{
	if(document.getElementById('hidAdSpaceId').value=='')
		document.getElementById('errorId').innerHTML = '<div style="width:750px;height:40px;border:#999999 thin solid; vertical-align:middle;" class="err_class"><br>Please select a record by clicking on it.</div>';
	else
	{
		document.getElementById('errorId').innerHTML = '';
		adtoFavAjax('include_ajax/',document.getElementById('hidAdSpaceId').value);
	}
}
function addAdSpaceId(val,$count)
{
	hidID = document.getElementById('hidAdSpaceId').value;
	var valWithComma = val+',';
	if(hidID.search(val)==-1)
	{
		document.getElementById('hidAdSpaceId').value =valWithComma+document.getElementById('hidAdSpaceId').value;
		document.getElementById('trList'+val).className = 'normalActive';
	}
	else
	{
		document.getElementById('hidAdSpaceId').value =hidID.replace(valWithComma,'');
		if($count==0)
			document.getElementById('trL and s.adSiteUrl like '%$keyword%' ist'+val).className = 'normal2';
		else
			document.getElementById('trList'+val).className = 'normal';
	}	
}
function checkClassName(val,$count)
{
	//alert("adsh sakljdl kasdas");
hidID = document.getElementById('hidAdSpaceId').value;
	var valWithComma = val+',';
	if(hidID.search(val)==-1)
	{
		
		if($count==0)
			document.getElementById('trList'+val).className = 'normal2';
		else
			document.getElementById('trList'+val).className = 'normal';
	}
	else
	{
		if($count==0)
			document.getElementById('trList'+val).className = 'normalActive2';
		else
			document.getElementById('trList'+val).className = 'normalActive';
	}	
}

function hide_left_div()
{	
document.getElementById('showdiv').style.verticalAlign = 'middle';
document.getElementById('hidediv').style.verticalAlign = 'middle';

	document.getElementById('left_search_show').style.display='none';
	document.getElementById('showdiv').style.display='block';

	document.getElementById('hidediv').style.display='none';

}

function show_left_div()
{document.getElementById('hidediv').style.verticalAlign = 'middle';

document.getElementById('showdiv').style.verticalAlign = 'middle';

	document.getElementById('left_search_show').style.display='block';
	document.getElementById('hidediv').style.display='block';
	document.getElementById('showdiv').style.display='none';

}
</script>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td valign="top" align="center"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
		<td width="244" valign="top"><?php include("left_pannel.php"); ?></td>
		<td width="25" valign="top">&nbsp;</td>
                    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="11"><img src="images/PinkBorderTopLeft.jpg" alt="" width="11" height="11"></td>
                              <td class="PinkBoxTopBg"><img src="images/spacer.gif" alt="" width="10" height="11"></td>
                              <td width="11"><img src="images/PinkBorderTopRight.jpg" alt="" width="11" height="11"></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td class="PinkTwosideBorder" valign="top">
<!-- ################################### displaying div starts ###################### -->
<input type="hidden" name="hidAdSpaceId" id="hidAdSpaceId" value="">
<div style="padding-top: 5px; padding-bottom: 15px;">
<table class="center" id="spaceListBlock">
		  <!--<tr>
			<td><img src="images/red_table_ltop.jpg" alt="" /></td>
			<td class="red_table_top"></td>
			<td><img src="images/red_table_rtop.jpg" alt="" /></td>
		  </tr>-->
		  <tr>
			<td class="">&nbsp;</td>
			
			
			<!-- ban body part -->
			<td class="inner_contentArea" align="center">
			<table width="750" cellspacing="0" cellpadding="0" border="0">
			<TR>
				<TD align="left"><a href="buyNetworkAds.php">Buy Network Ads</a></TD></TR>
			<TR>
				<TD align="center" class="sky font-18">Ad MarketPlace</TD></TR>
			<TR>
			<TR>
				<TD align="right">
					<input type="button" value="Add to Favourites" id="btnAddToFav" onclick="<?php echo $callFunction;?>">
				</TD>
			</TR>
			
			<TR>
				<TD align="center" id="errorId">&nbsp;</TD></TR>
			<TR>
			
			<tr><TD>
				<table width="750" class="mainTable" cellspacing="0" cellpadding="0">
		
				<tr>
					<td class="sitename"><a href="#" class="headerLink">Site Name</a></td>
					<td class="product"><a href="#" class="headerLink">Product</a></td>
					<td class="rank"><a href="#" class="headerLink">Rank</a></td>
					<td class="impression"><a href="#" class="headerLink">Impression</a></td>
					<td class="click"><a href="#" class="headerLink">Click/Day</a>&nbsp;<img src="images/dwn_arrow.jpg" alt="" /></td>
					<td class="cpc"><a href="#" class="headerLink">CPC</a></td>
					<td class="price"><a href="#" class="headerLink">Min Price/Day</a></td>
				</tr>
				<?php 
				
				$i=0;
				$GlobaLSPAce = '';
				$GlobaLPRIce = '';
if(mysql_num_rows($query)>0)
{
					while($result= mysql_fetch_array($query))
						{
						$i++;
						if($i%2==0)
						{
							$className = 'normalActive2';
							$className2 = 'normal2';
							$colorClass = 'gray';
						}
						else
						{
							$className = 'normalActive';
							$className2 = 'normal';
							$colorClass = 'white';
						}
							$siteUrlReplaced = str_replace("http://","",$result[adSiteUrl]);
							$siteUrlReplaceWWW = str_replace("www.","",$siteUrlReplaced);
						if($result[adspaceType]=='banner')
							$imgName = 'ban_icon.jpg';
						elseif($result[adspaceType]=='thumbnail')
							$imgName = 'thum_icon.jpg';
						else
							$imgName = 'tt_icon.gif';

						?>
				<tr id="trList<?php echo $result[adspaceId]; ?>" onmouseover="this.className='<?php echo $className;?>'" onmouseout="checkClassName(<?php echo $result[adspaceId]; ?>,<?php echo ($i%2); ?>);" class="<?php echo $className2; ?>" onclick="addAdSpaceId(<?php echo $result[adspaceId]; ?>,<?php echo ($i%2); ?>);">

					<td class="<?php echo $colorClass;?>_sitename"><a href="javascript:void(0);"  onclick="location.href='adSpaceDetails.php?id=<?php echo $result[adspaceId];?>'"  class="listLink"><?php echo $siteUrlReplaceWWW; ?></a></td>

					<td class="<?php echo $colorClass;?>_product"><a href="#" class="listLink" onmouseout="hidePreview();" onmouseover="popUpPreview(<?php echo $result[adspaceId]; ?>, event, 'product');" id="balloon<?php echo $result[adspaceId]; ?>"><img src="images/<?php echo $imgName;?>" border="0" alt="" />&nbsp;<?php echo ucfirst($result[adspaceType]); ?></A>
					</td>
					
					<td class="<?php echo $colorClass;?>_rank"><?php echo getAlexaRank($siteUrlReplaced); ?></td>
					<td class="<?php echo $colorClass;?>_impression"><?php echo $result[adSiteImpression]; ?></td>
					<td class="<?php echo $colorClass;?>_click"><?php echo $result[clickPerDay]; ?></td>
					<td class="<?php echo $colorClass;?>_cpc">$<?php echo number_format($result[costPerClick], 2, '.', ''); ?></td>
					<td class="<?php echo $colorClass;?>_price"><a href="#" class="listLink" onmouseout="hidePreview();" onmouseover="popUpPreview(<?php echo $result[adspaceId]; ?>, event, 'price')">$<?php echo $result[minPrice]; ?></A>
					<div style="display:none;width:400px;z-index:1; position:absolute;background-color:ffffff;border:#CCCCCC 1px solid;" id="adpriceDiv<?php echo $result[adspaceId]; ?>"></div></td>
				</tr> 
<?php				
$sql1="select * FROM ".ADSPSCEMASTER." where langId='".$langId."' and adspaceId='".$result[adspaceId]."'";
$query1=mysql_query($sql1);
$result1= mysql_fetch_array($query1);
$explodeDate1 = explode(' ' ,$result[publishDate]);
$siteUrlReplaced1 = str_replace("http://","",$result1[adSiteUrl]);
$siteUrlReplaceWWW1 = str_replace("www.","",$siteUrlReplaced1);

$sqlPrice="select * FROM ".PRICE." where adspaceId='".$result[adspaceId]."' order by duration asc";
$queryPrice=mysql_query($sqlPrice);
if($result[adSiteType]=='WEB')
	$adSiteType = 'Website';
else
	$adSiteType = 'Mobile';
	
#<!--###############################################################################################-->

			$GlobaLSPAce .= "spaceList[" . $result[adspaceId] . "] = ({
            'title' : '".$result1[adSpaceName]."',
            'image' : '".$GLOBALS[SiteUrl]."images/noimage.jpg',
			 'theme' : '',
            'link' : 'prompt.php?sid=f24dc7bb351fe6c1ed714721b1e632ff&url=http%3A%2F%2Fwww%2Eddlspot%2Ecom',
            'type' : 'GTB',
            'categoryPathShort' : '".$adSiteType."',
            'siteRating' : '".$result1[adsSiteRating]."',
            'urlDisplay' : '".$result1[adSiteUrl]."',
            'availableDate' : '".$explodeDate1[0]."',
                        'demographicNumber' : '6',
            'demographicDisplay' : new Array(),
            'siteDescription' : '".$result[siteDescription]."',
            'spaceDescription' : '".substr($result1[description],0,200)."',
            'spaceTags' : '".$result1[tags]."'
        });";
$execTopCountry = mysql_query("select noOfClicks,adCountryName from adspaceTopcountries where adspaceId='".$result[adspaceId]."' order by noOfClicks desc limit 0,5");
		while($getTopCountry = mysql_fetch_array($execTopCountry)) 
						{
			$GlobaLSPAce .= "spaceList[" . $result[adspaceId] . "].demographicDisplay.push(new Array('".ucwords($getTopCountry[1])."', '".getClickPercent($result1[totClicksPerDay],$getTopCountry[0])."'));";
			}
			
			$GlobaLPRIce .= "priceList[" . $result[adspaceId] . "] = new Array();";
if(mysql_num_rows($queryPrice)>0)
{
	while($resultPrice= mysql_fetch_array($queryPrice)){
	if($result[clickPerDay]==0)
	{
		$clickPerDay = '*New';
		$avgCPC = '*New';
	}
	else
	{
		$clickPerDay = $result[clickPerDay]*$resultPrice[duration];
		$avgCPC = '$'.number_format($resultPrice[ammount]/$result[clickPerDay], 2, '.', '');
	}
			$GlobaLPRIce .= "priceList[" . $result[adspaceId] . "].push({
				
				'day' : '".$resultPrice[duration]."',
				'price' : '$".$resultPrice[ammount]."',
				'avgClicks' : '".$clickPerDay."',
				'avgCostPerClick' : '".$avgCPC."'
			}); ";
	}
}
else
{
			$GlobaLPRIce .= "priceList[" . $result[adspaceId] . "].push({
				
				'day' : 'No',
				'price' : ' Found',
				'avgClicks' : ' Record',
				'avgCostPerClick' : ''
			}); ";

}



#<!--###############################################################################################-->
?>				
				
				
				<?php } } if(mysql_num_rows($query)<1)
 { ?>
				<tr><TD>No Record Found</TD></tr> <? } ?>
				</table>
			</TD></TR>
			</table>
			</td>
			<!-- /ban body part -->			
			
			
			<td class="">&nbsp;</td>
		  </tr>
		  <tr>
			<!--<td><img src="images/red_table_lbottom.jpg" alt="" /></td>
			<td class="red_table_bottom"></td>
			<td><img src="images/red_table_rbottom.jpg" alt="" /></td>-->
			<div id="errorBlock" style="width: 450px; position: absolute; display: none;">
  <table style="background-color: rgb(255, 255, 255); width: 100%;" cellpadding="3" cellspacing="1">
    <tbody><tr>
      <td style="text-align: left; color: rgb(255, 255, 255); font-weight: bold;" class="blue-background-small">Error,The ad space does not exist.</td>
    </tr>
  </tbody></table>
</div><div id="spacePreviewBlock" style="width: 450px; position: absolute; display: none; border:1px #cccccc solid; z-index: 80; top: 208px; left: 681px;">
  <table style="background-color:#ffffff; width: 100%;" cellpadding="3" cellspacing="1">
    <tbody><tr>
      <td class="listHeader" id="title"></td>
    </tr>
    <tr>
      <td>
        <div style="padding: 3px; text-align: left;">
          <table id="ptable" class="login_txt" cellpadding="2" cellspacing="2">
            <tbody><tr>
              <td style="padding-top: 10px;">
                <div align="center"><strong>Available:</strong><span id="availabledate" style="color: rgb(0, 0, 0);"></span></div>
                <div align="center"><a id="imageLink" href="" target="_blank"><img src="image/noimage.jpg" style="border: 4px none rgb(153, 153, 153); width: 201px; height: 147px;" alt="label_text_space_image"></a></div>
                <div id="categoryPath" style="padding: 2px; background: rgb(225, 225, 225) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" title="Technology &amp;amp; Internet" align="center"></div>
              </td>
              <td style="vertical-align: top; padding-top: 0px;">
                <table cellpadding="2" cellspacing="2" class="login_txt">
                  <tbody><tr id="lastImpressionBlock" style="display: none;"><td class="highlight-label" style="border-right-style: none;"><span class="blackbold">Last Impression:</span>&nbsp;<span id="lastImpression" style="font-weight: lighter; display: block;">N/A</span><span style="font-weight: lighter; display: none;"></span></td></tr>
                  <tr id="themeBlock" style="display: none;"><td><span class="blackbold" style="padding-right: 2px;"></span><span id="theme"></span></td></tr>
                  <tr><th nowrap="nowrap" align="left">Top 3 countries:</th></tr>
                  <tr id="topCountry" style="display: block;"><td>N/A</td></tr>
                  <tr><td id="topCountry1" align="left"></td></tr>
                  <tr><td id="topCountry2" align="left"></td></tr>
                  <tr><td id="topCountry3" align="left"></td></tr>
                  <tr><td nowrap="nowrap" align="left"><span><strong>Site Rating:</strong></span><span id="siteRating"></span></td></tr>
                  <tr><td nowrap="nowrap"><span id="urlDisplay" class="blackbold"></span></td></tr>
                </tbody></table> 
              </td>
            </tr>
          </tbody></table>
          <hr>
          <table style="text-align: left;" class="login_txt">
            <tbody><tr><th><strong>Site Description:</strong></th></tr>
            <tr><td id="siteDescription"></td></tr>
          </tbody></table>
          <hr>
          <table style="text-align: left;" cellspacing="4" class="login_txt">
            <tbody><tr>
              <td style="width: 300px;"><strong>Ad Space Description:</strong></td>
              <td style="width: 250px;"><strong>Tags:</strong></td>
            </tr> 
            <tr>
              <td id="spaceDescription" style="vertical-align: top;" align="justify"></td>
              <td id="spaceTags" style="vertical-align: top;"></td>
            </tr>
          </tbody></table>
        </div>
      </td>
    </tr>
  </tbody></table>
</div> 

<!-- ################################### displaying div ends ######################### -->
</td>
                      </tr>
                      <tr>
                        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="11"><img src="images/PinkBorderBottomLeft.jpg" alt="" width="11" height="11"></td>
                              <td class="PinkBoxBottomBg"><img src="images/spacer.gif" alt="" width="10" height="11"></td>
                              <td width="11"><img src="images/PinkBorderBottomRight.jpg" alt="" width="11" height="11"></td>
                            </tr>
                        </table></td>
                      </tr>
                    </table></td>
                    <td>&nbsp;</td>
                    </tr>
                </table></td>
              </tr>
            </table>
</form>
            
<?php } ?>




<script>
    var spaceList = new Array();
    var popupSpace = new PopUpAdspace();
    var initSpaceData = window.onload;
    window.onload = function() {
        if (initSpaceData) {
            initSpaceData();
        }
		<?php echo $GlobaLSPAce;?>	
		popupSpace.setData(spaceList);
    }

	/*******************************************************************************************/
	
	var priceList = new Array();
	var popupPrice = new popUpPrice();
	var initSpacePrice = window.onload;
	window.onload = function() {
		if(initSpacePrice) {
			initSpacePrice();
		}
		<?php echo $GlobaLPRIce;?>	
			popupPrice.setData(priceList);
	}

	
</script>